package com.suyang.syt.service.interfaces;

import java.util.List;

import com.suyang.syt.model.User;
import com.suyang.syt.model.UserRole;
import com.suyang.syt.model.dto.AjaxObj;
import com.suyang.syt.model.dto.PagerEasyUI;
import com.suyang.syt.model.dto.UserDTO;

public interface UserService {

	/** 用户注册 */
	public AjaxObj updateRegist(String username, String password) throws Exception;

	/** 用户注册验证码 （##测试用） */
	public AjaxObj updateRegistCheckCode(String username) throws Exception;

	/** 添加一个用户对象 */
	public AjaxObj add(UserDTO userDTO) throws Exception;

	/** 批量删除用户 */
	public AjaxObj deletes(String ids) throws Exception;

	/** 更新用户 */
	public AjaxObj update(UserDTO userDTO) throws Exception;

	/** 分页查询用户列表 */
	public PagerEasyUI<UserDTO> listByEasyUI(int page, int rows, String sort, String order, User user, String createDate1, String createDate2) throws Exception;

	/** 根据用户ID获取用户对应的角色信息 */
	public List<UserRole> listUserRoles(long userId) throws Exception;

	/** 修改用户密码 */
	public AjaxObj updatePwd(User user, String password, String passwordNew, String passwordRe) throws Exception;

	/** 批量重置用户密码 */
	public AjaxObj updateAllPwd(String ids, String names) throws Exception;

	/** 批量开通用户 */
	public AjaxObj updateUserStart(String ids, String names) throws Exception;

	/** 批量关闭用户 */
	public AjaxObj updateUserStop(String ids, String names) throws Exception;

	public List<User> listGroupUsers(long groupId);

	public List<User> listPxjgUsers(long ttcid);

	/*** 根据机构教师uid 获取教师的用户账号详情 ***/
	AjaxObj findUserByTid(long uid) throws Exception;

	User load(long id) throws Exception;

	List<User> list(String ids) throws Exception;

	public User loadByUserName(String username);

	public void update(User user);

}
